/*
 * Created on 27/04/2008
 */

package com.apbetioli.mapr.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author Alexandre Parra Betioli
 */
public class XmlConverter {

    static public String xmlToString( final String filename ) throws FileNotFoundException, IOException {
        
        File file = new File(filename);
        FileReader fr = new FileReader(file);
        BufferedReader br = new BufferedReader(fr);

        StringBuffer sb = new StringBuffer();
        String line;
        while ((line = br.readLine()) != null) {
            sb.append(line);
        }
        
        return sb.toString();
    }

}
